import request from '@/utils/encryptionRequest';

// 首页分类
export function catecfg(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/catecfg.do',
    data,
    opt,
  });
}

// 首页列表
export function mainIndexHandler(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/mainIndex.do',
    data,
    opt,
  });
}

// 获取osstoken
export function getOSSToken(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/getOssToken.do',
    data,
    opt,
  });
}

// 更新sku
export function updSku(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/updSku.do',
    data,
    opt,
  });
}

// 提交商品
export function submitGoods(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/submitGoods.do',
    data,
    opt,
  });
}

// 我发布的商品
export function mygoodList(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/mygoodList.do',
    data,
    opt,
  });
}

// 商品详情
export function tGoodsDetail(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/t_goodsDetail.do',
    data,
    opt,
  });
}

// 商品详情
export function skuDetail(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/skuDetail.do',
    data,
    opt,
  });
}

// 商品上下架状态编辑
export function updIfonsale(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/updIfonsale.do',
    data,
    opt,
  });
}

// 商品删除
export function delGoods(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/delGoods.do',
    data,
    opt,
  });
}

// 我发布的商品
export function goodList(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/goodList.do',
    data,
    opt,
  });
}

// 商品购买
export function goodsBuy(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/goodsBuy.do',
    data,
    opt,
  });
}

// 收货地址列表
export function shouhuositelist(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/shouhuositelist.do',
    data,
    opt,
  });
}

// 我买到的订单列表
export function shopOrderList(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/shop_orderList.do',
    data,
    opt,
  });
}

// 我卖出的订单列表
export function shopSaleorderList(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/shop_saleorderList.do',
    data,
    opt,
  });
}

// 订单详情
export function shopOrderDetail(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/shop_orderDetail.do',
    data,
    opt,
  });
}

// 订单退款
export function shoprefund(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/shoprefund.do',
    data,
    opt,
  });
}

// 订单发货
export function shopfahuo(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/shopfahuo.do',
    data,
    opt,
  });
}

// 订单确认收货
export function shopconfirm(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/shopconfirm.do',
    data,
    opt,
  });
}

// 用户信息
export function shopuserInfo(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/shopuserInfo.do',
    data,
    opt,
  });
}

// 快递列表
export function kuaidiList(data: object, opt = {}) {
  return request({
    method: 'post',
    url: '/kuaidiList.do',
    data,
    opt,
  });
}
